﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebMessage.aspx.cs" Inherits="Web.WebMessage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        * { /* 清除内外边距，写样式时常用的*/
            margin: 0;
            padding: 0;
        }

        .nav{
           width:1200px;
           margin:0 auto;
        }
        .nav h4{
            color: #202026;
            font-size: 20px;
            border-bottom: 1px solid #cccccc;
            padding-bottom: 3px;
            margin-bottom: 14px;

        }
        li{
            list-style: none; /*取消列表前面的小点 */
        }
        .nav li{
            height: 38px;
            line-height: 38px;
            border-bottom: 1px dashed #cccccc ; /*下边框虚线*/
            text-indent: 2em;/*首行缩进*/
        }
        .nav a{
            font-size: 14px;
            color: #333333;
            text-decoration: none;


        }
        .nav a:hover{
            /*background-color: darkgrey;*/
            text-decoration: underline; /*鼠标触发时添加下划线*/
        }
        body{
            background-color: #eeeeee;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p style="padding:10px 0px 10px 0px;">
         <asp:SiteMapPath ID="SiteMapPath1" runat="server" CssClass="sitmap"
        Style="font-family: 幼圆; font-size: medium" Font-Names="Verdana" Font-Size="0.8em"  PathSeparator=" > ">
        <PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />
        <CurrentNodeStyle ForeColor="#333333" />
        <NodeStyle Font-Bold="True" />
        <RootNodeStyle Font-Bold="True"  />
    </asp:SiteMapPath>
    </p>
   
    <div class="nav" style="padding:10px 0px 10px 0px;">
        <h4>文章列表</h4>
        <ul id="cons">
           
           
        
        </ul>
    </div>
     <script type="text/javascript" src="Scripts/jquery.min.js"></script>
    <script>
        $(function () {
            $.ajax({
                type: 'post',
                url: '../Hanlder/MessageHandler.ashx?Method=GetList',
                data: {"mes_type_id":"<%=tid%>" },
                success: function (data) {
                    var res = $.parseJSON(data);
                    if (res.length <= 0) {
                        $("#cons").html(" <li style=\"text-align:center;\"><span>无数据</span></li>");
                    } else {
                        $("#cons").html("");
                        var str = "";
                        for (var i = 0; i < res.length; i++) {
                            var titile = MaxHref(20,res[i].title, function (title) {
                                str += " <li><a href=\"WebMesDetails.aspx?Id=" + res[i].Id + "\"><span style=\"float:left;\">" + title + "</span><span style=\"float:right;\">" + fmartdate_new(res[i].create_time); +"</span></a></li>";
                            })
                            $("#cons").html(str);
                        }
                      
                    }
                }
            });
        });
    </script>
</asp:Content>
